package com.zlq.work07;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestBean {
    @Test
    public void test() {
        //1 加载 spring 配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        //2 获取配置创建的对象
        MoAttack moAttack = context.getBean("moAttack", MoAttack.class);
        moAttack.cityGateAsk();
    }
}
